package org.zxp.designpattern.builder;

import lombok.Builder;
import lombok.Data;

/**
 * @program: effectiveJava
 * @description:通过lombok添加Builder
 * @author: X-Pacific zhang
 * @create: 2019-08-22 11:17
 **/
@Builder
@Data
public class Pojo {
    private String name;
    private int age;
    private String sex;
    private String phone;
}



class Test{
    public static void main(String[] args){
        Pojo pojo = Pojo.builder().age(1).sex("男").build();
        System.out.println(pojo);
    }
}
